<%@ page import="bean.Login" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>新增房间</title>
    <style type="text/css">
        h1 {
            text-align: center;
        }

        h4 {
            text-align: center;
            color: red;
        }

        body {
            background-color: rgba(206, 192, 192, 0.1);
        }

        div {
            text-align: center;
        }

        label {
            width: 100px;
            text-align: right;
            display: inline-block;
        }



        /*#before {*/
        /*    text-align: center;*/
        /*}*/

    </style>
</head>
<body>
<%-- 头部 --%>
<%--<jsp:include page="top.jsp"/>--%>

<h1>增加房间</h1>
<hr>
<form action="AddServlet" method="post">
    <div>
        <tr>
            <label>房间号:</label>
            <input type="text" name="RoomName" id="RoomName" placeholder="房间号">
        </tr>
    </div>
    <div>

        <tr>
            <label>房  型:</label>
            <input type="text"  name="RoomType" id="RoomType" placeholder="房型">
        </tr>
    </div>
    <div>
        <tr>
            <label>房  价:</label></td>
            <input type="text" name="Price" id="Price" placeholder="房价(数字)">
        </tr>
    </div>
    <div>
        <tr>
            <label>面  积:</label>
            <input type="text" name="RoomSize" id="RoomSize" placeholder="面积（数字）">
        </tr>
    </div>
    <tr>
        <label>预定情况：</label>
        <input type="radio" name="RoomCondi"  value="已预定" checked="ok">已预定
        <input type="radio" name="RoomCondi" value="未预定">未预定
    </tr>
    <div id="submitbtn">
        <tr>
            <button type="submit" onclick="return checkForm()">添加</button>
            <button type="reset">重置</button>

        </tr>
    </div>
</form>

<script type="text/javascript">
    function checkForm() {
        var bookname = registerForm.bookname.value;
        var price = registerForm.price.value;
        if (bookname == "" || bookname == null) {
            alert("请输入房型");
            registerForm.bookname.focus();
            return false;
        } else if (price == "" || price == null) {
            alert("请输入房价");
            registerForm.price.focus();
            return false;
        }
        alert('添加成功！');
        return true;
    }
</script>
</body>
</html>
